package com.tsd.jxc.stock.dao;

import com.tsd.common.vo.BatchDeleteLogicVo;
import com.tsd.core.vo.PageBean;
import com.tsd.jxc.stock.entity.JxcStockOutbillItem;
import com.tsd.jxc.stock.entity.JxcStockOutbillItemExt;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：JxcStockOutbillItemMapper
 *
 * @author Hillpool
 * @date 2022/07/29 15:06:41
 */
public interface JxcStockOutbillItemMapper {

    JxcStockOutbillItem selectByPrimaryKey(Long id);

    JxcStockOutbillItemExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(JxcStockOutbillItem record);

    int insertSelective(JxcStockOutbillItem record);

    int insertList(@Param("list") List<JxcStockOutbillItemExt> list);

    int updateByPrimaryKey(JxcStockOutbillItem record);

    int updateByPrimaryKeySelective(JxcStockOutbillItem record);

    int updateList(@Param("list") List<JxcStockOutbillItemExt> list);

    List<JxcStockOutbillItemExt> selectByEntity(JxcStockOutbillItemExt record);

    List<JxcStockOutbillItemExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<JxcStockOutbillItemExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<JxcStockOutbillItemExt> selectByParams(@Param("params") Map<String, Object> params);

    int deleteLogicByIdList(BatchDeleteLogicVo logicVo);

    int deleteLogicByBillList(BatchDeleteLogicVo logicVo);

    int updatePositionQty(@Param("bill_sid") String bill_sid, @Param("item_sid") String item_sid);

    List<String> selectProductList(@Param("bill_list") List<String> bill_list);

    JxcStockOutbillItemExt select4CheckPosition(@Param("bill_list") List<String> bill_list);

    List<JxcStockOutbillItemExt> selectStockOutbillsDetailPositionBySid(String sid, int dr);

    List<JxcStockOutbillItemExt> selectByGoodsName(String goods_name);

    List<JxcStockOutbillItemExt> selectBySids(@Param("sids") List<String> sids, @Param("dr") int dr);

    List<String> selectSrcSidByBillSids(@Param("bill_sid") List<String> sids);

    void updateQty4baseByBillSid(@Param("bill_sid") String bill_sid);
}
